function [ img_mean, img_var ] = initBackgroundModel( init, initframes )
%INITBACKGROUNDMODEL Summary of this function goes here
%   Detailed explanation goes here

    img_mean = mean(init,4);
    
    img_var = zeros(size(img_mean,1), size(img_mean,2), size(img_mean,3));
    for n=1:initframes
        img_var = imadd(img_var(:,:,:), imsubtract(init(:,:,:,n), img_mean(:,:,:)).^2);
    end
    img_var = imdivide(img_var, initframes);
    
end

